<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Welcome</title>
</head>
<body bgColor="Red">

<s:form action="logOut" style="float: right;">
		<s:submit value="Logout" />
</s:form>

<h3><strong>Welcome admin!</strong></h3>

<div>
	<s:form action="goAddFilm" style="display:inline-block; height: 20px;">
			<s:submit value="Submit" />
	</s:form>
	new film.
</div>

<s:property value="@films.PostAction@collection" />
	
<p><span style="text-decoration: underline;">Current films:<strong><br /></strong></span></p>
	
<s:iterator value="%{collection.films()}" status="row">
				
				<div>			
				<s:property value="title" />
				<s:form action="showInfo" style="display:inline-block; height: 20px;">
						<s:hidden name="title" value="%{title}" />
						<s:hidden name="rate" value="%{rate}" />
						<s:hidden name="opinion" value="%{opinion}" />						
                        <s:submit key="See" name="submit"  />        	
       			 </s:form>
				
				<s:form action="editInfo" style="display:inline-block; height: 20px;">
				  <s:hidden name="oldTitle" value="%{title}" />
  				  <s:hidden name="title" value="%{title}" />
				  <s:hidden name="rate" value="%{rate}" />
				  <s:hidden name="opinion" value="%{opinion}" />				  
                  <s:submit key="Edit" name="submit" />    				  
  				</s:form>
  				
  				<s:form action="removeFilm" style="display:inline-block; height: 20px;">  					
  					<s:hidden name="title" value="%{title}" /> 
  					<s:submit key="Remove" name="submit" /> 
  				</s:form>
  				</div>		
  				<p> </p>		
				
</s:iterator>
</body>
</html>